<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ComboBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Pagination?>
<?import javafx.scene.control.RadioButton?>
<?import javafx.scene.control.TableView?>
<?import javafx.scene.control.ToggleGroup?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>

<VBox fx:id="rootVBox" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="app.gui.controllers.EntityTableController">
   <children>
      <Button fx:id="searchButton" alignment="TOP_LEFT" maxWidth="1.7976931348623157E308" mnemonicParsing="false" onAction="#openSearchBox" text="Открыть параметры поиска" underline="true" />
      <HBox fx:id="searchBox" alignment="CENTER">
         <children>
            <VBox fx:id="sortingBox" spacing="5.0" HBox.hgrow="ALWAYS">
               <children>
                  <HBox alignment="CENTER_LEFT">
                     <children>
                        <Label maxWidth="1.7976931348623157E308" text="Сортировать по: " />
                        <ComboBox fx:id="sortChoiceBox" prefWidth="150.0" />
                     </children>
                  </HBox>
                  <RadioButton fx:id="ascendingOrderButton" mnemonicParsing="false" onAction="#setAscendingSortOrder" selected="true" text="По возрастанию">
                     <toggleGroup>
                        <ToggleGroup fx:id="sortOrderGroup" />
                     </toggleGroup>
                  </RadioButton>
                  <RadioButton fx:id="descendingOrderButton" mnemonicParsing="false" onAction="#setDescendingSortOrder" text="По убыванию" toggleGroup="$sortOrderGroup" />
               </children>
               <HBox.margin>
                  <Insets />
               </HBox.margin>
            </VBox>
            <VBox fx:id="filteringVBox" />
         </children>
      </HBox>
      <TableView fx:id="entityTable" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="200.0" prefWidth="646.0" VBox.vgrow="ALWAYS">
         <columnResizePolicy>
            <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" />
         </columnResizePolicy>
      </TableView>
      <HBox alignment="CENTER" VBox.vgrow="NEVER">
         <children>
            <Pagination fx:id="pagination" maxHeight="-Infinity" maxWidth="1.7976931348623157E308" pageCount="7" prefHeight="50.0" prefWidth="200.0">
               <HBox.margin>
                  <Insets right="10.0" />
               </HBox.margin>
            </Pagination>
            <VBox alignment="CENTER" spacing="10.0">
               <children>
                  <Label fx:id="pageSizeLabel" maxWidth="1.7976931348623157E308" />
                  <Label fx:id="totalSizeLabel" maxWidth="1.7976931348623157E308" />
               </children>
            </VBox>
            <Region maxWidth="1.7976931348623157E308" HBox.hgrow="ALWAYS" />
            <Button fx:id="createButton" mnemonicParsing="false" onAction="#openCreateWindow" text="Добавить">
               <HBox.margin>
                  <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
               </HBox.margin>
            </Button>
            <Button fx:id="refreshButton" mnemonicParsing="false" onAction="#refreshTableContents" text="Обновить">
               <HBox.margin>
                  <Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
               </HBox.margin>
            </Button>
         </children>
      </HBox>
   </children>
</VBox>
